export const getPermissionList = (params) => {
  return http({
    method: "GET",
    url: `/api-user/menus/findAlls`,
    params,
  });
};

export const getPermissionOrganization = (params) => {
  return http({
    method: "GET",
    url: `/permission/organization`,
    params,
  });
};

export const addPermission = (data) => {
  return http({
    method: "post",
    url: `/api-user/menus/saveOrUpdate`,
    data,
  });
};

export const editPermission = (data) => {
  return http({
    method: "post",
    url: `/api-user/menus/saveOrUpdate`,
    data,
  });
};

export const deletePermission = (params) => {
  return http({
    method: "delete",
    url: `/api-user/menus/${params.id}`,
    params,
  });
};


export const getPermissionTree = (params) => {
  return http({
    method: "get",
    url: `/api-user/menus/findOnes`,
    params,
  });
};


